 
import { Entity, PrimaryGeneratedColumn, Column, Index } from 'typeorm';

@Entity()
//菜单实体
export class Dictionary {
  @PrimaryGeneratedColumn()
  id: number;

  @Column()
  @Index() 
  label: string;

  @Column()
  @Index() 
  value: string;

  @Column({
    name: 'type_code',
    length: 30,
    nullable: true,
    comment: '字典类型编码' 
  })
  typeCode: string;
   
  @Column({ type: 'timestamp', default: () => 'CURRENT_TIMESTAMP' })
  createdAt: Date;

  @Column({ type: 'timestamp', default: () => 'CURRENT_TIMESTAMP' })
  updatedAt: Date;
}
